#!/usr/bin/env python
import wx
from wx.py.shell import ShellFrame
from wx.py.filling import FillingFrame

class Frame(wx.Frame):
	def __init__(self, parent, id, title):
		wx.Frame.__init__(self, parent, wx.ID_ANY, title, size=(400, 200),\
                          style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE\
                          )
        #--- Setting up the menu.
		menu = wx.Menu()
		shell = menu.Append(-1, "&wxPython shell", "Open wxPython shell frame.")
		filling = menu.Append(-1, "&Namespace viewer", "Open namespace viewer frame.")
		menubar = wx.MenuBar()
		menubar.Append(menu, "&WHQ")

		self.Bind(wx.EVT_MENU, self.OnShell, shell)
		self.Bind(wx.EVT_MENU, self.OnFilling, filling)

		self.SetMenuBar(menubar)

	def OnShell ( self, event ):
		frame = ShellFrame ( parent = self )
		frame.Show()

	def OnFilling ( self, event ):
		frame = FillingFrame ( parent = self )
		frame.Show()

if __name__ == '__main__':
	app = wx.PySimpleApp()
	app.frame = Frame(None, -1, "Py Shell Frame and Filling Frame")
	app.frame.Show()
	app.MainLoop()
